package old_Enemies;

import java.awt.Image;

import old_engine.Game;
import old_engine.Platform;

public abstract class Enemy {
	
	protected int x, y;
	protected double vit, damage;
	protected Game game;
	protected boolean alive = true;
	
	public Enemy(int x, int y, double vit, double damage, Game game){
		this.vit = vit;
		this.damage = damage;
		this.game = game;
		this.x = x;
		this.y = y;
	}
	
	public abstract Image getImage();
	
	public void getHit(double damage){
		vit -= damage;
		if (vit <= 0)
			alive = false;
	}

	public abstract void update();
	
	public int getX() {
		return x;
	}

	public void setX(int x) {
		this.x = x;
	}

	public int getY() {
		return y;
	}

	public void setY(int y) {
		this.y = y;
	}

	public double getVit() {
		return vit;
	}

	public void setVit(double vit) {
		this.vit = vit;
	}

	public double getDamage() {
		return damage;
	}

	public void setDamage(double damage) {
		this.damage = damage;
	}

	public boolean isAlive() {
		return alive;
	}

	public void setAlive(boolean alive) {
		this.alive = alive;
	}
	
	
	
	
}
